
extension StringExtension on String {

  bool isValidPhoneNumber() {
    final phoneRegex = RegExp(r'^1[3-9]\d{9}$');
    return phoneRegex.hasMatch(this);
  }

  String getThumbUrl({required int size}) {
    if (isEmpty) {
      return "";
    }

    if (this.contains("metatube.pro") || this.contains("ideaflow.pro")) {
      return "$this?imageView2/3/w/$size/h/$size";
    } else {
      return this;
    }
  }
}